package com.my.test.thread.callable;

import java.util.concurrent.ExecutionException;
import java.util.concurrent.ExecutorService;
import java.util.concurrent.Executors;
import java.util.concurrent.Future;

public class Test {

    public static void main(String[] args) throws ExecutionException, InterruptedException {
        ExecutorService ex = Executors.newFixedThreadPool(10);
        /*CallAbleString call = new CallAbleString();
        Future<String> future = ex.submit(call);
        System.out.println(future.get());*/

        CallAbleEntity  entity = new CallAbleEntity();
        Future<Student> future2 = ex.submit(entity);
        Student student = future2.get();
        System.out.println(student.toString());
        ex.shutdown();
    }
}
